title="收货地址"
url="/account/updata-shipping-address/:id"
layout="default-x"
==
function onStart(){
	$this['previousUrl'] = URL::previous() ?: '';
}
==


<div class="regist_content">
		<div class="breadCrumb">
			<div class="pankz">
				<a href="/" shape="rect">HCLOSET</a>&gt;
				<a href="/account" shape="rect">マイページトップ</a>&gt;
				会員基本情報の確認･変更
			</div>
			<h2 class="pageTitle noBg">マイページ</h2>
			<h2 class="pageTitle headBg1">会員基本情報の確認･変更</h2>
		</div>
		<div class="registCont">
			<p class="pHead">
				登録内容を変更する場合は、該当項目を修正し「登録内容を確認する」ボタンをクリックしてください。
			</p>
			{% set address = catalog.getAddress(this.param.id) %}

			<form class="form-horizontal" data-request="onUpdateAddress" data-request-redirect="{{ previousUrl }}">
			<ul class="registContBox">
			
				
				<li>
					<h4><b>お名前</b><span class="requireSpan">必須</span></h4>
					<input style="display:none;" type="text" class="commonInput" name="address_id" id="address_id" value='{{ address.id ? address.id : 0 }}'>
					<input type="text" class="loginInput" id="firstName" value="{{ address.first_name ? address.first_name : '' }}" name="first_name" required>
					<p class="support-txt">全角（例：阪急花子）</p>
				</li>
				<li>
					<h4><b>お名前（フリガナ）</b><span class="requireSpan">必須</span></h4>
					<input type="text" class="loginInput" id="lastName" name="last_name" value="{{ address.last_name ? address.last_name : '' }}" required>
					<p class="support-txt">全角カタカナ（例：ハンキュウハナコ）</p>
				</li>
				
				<li>
					<h4><b>電話番号</b><span class="requireSpan">必須</span></h4>
					<input maxlength="3" pattern="[0-9]{3}" name="phone0"  value="{{ address.phone0 ? address.phone0 : '' }}" type="text" required style="width: 20%;" class="loginInput">
					<span style="padding: 10px">-</span>        
					<input name="phone1"  value="{{ address.phone1 ? address.phone1 : '' }}" type="text" required style="width: 20%;" maxlength="4" pattern="[0-9]{4}" class="loginInput">
					<span style="padding: 10px">-</span>        
					<input name="phone2"  value="{{ address.phone2 ? address.phone2 : '' }}" type="text" required style="width: 20%;" maxlength="4" pattern="[0-9]{4}" class="loginInput">  
					<p class="support-txt">（例）090-1234-5678</p>
				</li>
				<li>
					<h4><b>固定電話</b></h4>
					<input maxlength="3" pattern="[0-9]{3}" name="tel"  value="{{ address.tel ? address.tel : '' }}" type="text" style="width: 20%;" class="loginInput">
					<span style="padding: 10px">-</span>        
					<input name="tel1"  value="{{ address.tel1 ? address.tel1 : '' }}" type="text" style="width: 20%;" maxlength="3" pattern="[0-9]{3}" class="loginInput">
					<span style="padding: 10px">-</span>        
					<input name="tel2"  value="{{ address.tel2 ? address.tel2 : '' }}" type="text" style="width: 20%;" maxlength="4" pattern="[0-9]{4}" class="loginInput">        
					<p class="support-txt">（例）086-123-4567</p>
				</li>
				
				<li>
					<h4><b>郵便番号</b><span class="requireSpan">必須</span></h4>
					<input type="text" class="loginInput wid30" id="" maxlength="8"  pattern="(\d){3}[-]{0,1}(\d){4}" name="zip" value="{{ address.zip ? address.zip : '' }}" required onKeyUp="AjaxZip3.zip2addr(this,'','state_id','city','address');">					
					<p class="support-txt">半角数字</p>
					<p><a target="_blank" shape="rect" href="http://www.post.japanpost.jp/kt/zip/menu.cgi?p=ken0">郵便番号が分からない方はこちら</a></p>
					<p>
						※郵便番号をご入力後、郵便番号検索ボタンを押してください。住所が自動で入力されます。
						<br>
						※海外の方は999-9999をご入力ください。
					</p>
				</li>

				<li>
					<h4><b>国</b><span class="requireSpan">必須</span></h4>
					{{ form_select_country('country_id',
					(address.country_id ? address.country_id : 122), {
					id: 'accountCountry',
					class: 'loginInput loginSelect',
					'required': '',
					'data-request': 'onPullStateList',
					'data-request-success': 'afterChangeCountry($el, data)'
					})
					}}
				</li>
				<li>
					<h4><b>都道府県</b><span class="requireSpan">必須</span></h4>

					{{ form_select_state('state_id',
						user.country_id ? user.country_id : 122,
						user.state_id ? user.state_id : 285, {
						id: 'state_id',
						class: 'loginInput loginSelect',
						'required': '',
						emptyOption: ''
						}) }}
				</li>
				<li>
					<h4><b>市区郡</b><span class="requireSpan">必須</span></h4>
					<input type="text" class="loginInput" id="" name="city" value="{{ address.city ? address.city :'' }}" required>
					<p class="support-txt">例：大阪市北区</p>
				</li>
				<li>
					<h4><b>町村</b><span class="requireSpan">必須</span></h4>
					<input type="text" class="loginInput" id="" name="address" value="{{ address.address ? address.address : '' }}" required>
					<p class="support-txt">例：角田町</p>
				</li>
				<li>
					<h4><b>番地・マンション名</b><span class="requireSpan">必須</span></h4>
					<input type="text" class="loginInput" id="" name="address_detail" value="{{ address.address_detail ? address.address_detail : '' }}" required>
					<p class="support-txt">例：８－７ 阪急マンション１０１号室</p>
				</li>
				<li>
					<h4><b>メールアドレス</b><span class="requireSpan">必須</span></h4>
					<input type="email" class="loginInput" id="" name="email" value="{{ address.email ? address.email : '' }}" required>
					<p class="support-txt">半角英数</p>
				</li>
				
			</ul>
			<div>
				<input type="submit" name="" value="＞ 登録内容を確認する" class="blackBtn1">
			</div>
			</form>
		</div>
	</div>
<script src="https://ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>